78
Beginner’s Guide to Code Algorithms
78
STEP 2 Functions (continued)
If InStr(ShowText, “http”) > 0 Then
MyCallout.Fill.ForeColor.RGB = RGB(255, 255, 255)
LaunchLink = 1
End If
Application.SlideShowWindows(1).View.GotoSlide (ActivePresentation.
SlideShowWindow.View.CurrentShowPosition)
Exit Sub
CallOutCreate:
Set MyCallout = sldOne.Shapes.AddCallout(Type:=msoCalloutTwo, Left:=50,
Top:=50, _
Width:=200, Height:=100)
MyCallout.TextFrame.AutoSize = ppAutoSizeShapeToFitText
MyCallout.TextFrame.TextRange.Text = ShowText
MyCallout.Name = “Impromptu”
If InStr(ShowText, “http”) > 0 Then
MyCallout.Fill.ForeColor.RGB = RGB(255, 255, 255)
LaunchLink = 1
End If
Application.SlideShowWindows(1).View.GotoSlide (ActivePresentation.
SlideShowWindow.View.CurrentShowPosition)
End Sub
Sub AddMedia(ShowText)
Dim osld As Slide
Dim ovid As Shape
Dim sldOne As Slide
Set sldOne = ActivePresentation.Slides(ActivePresentation.SlideShowWindow.View.
CurrentShowPosition)
PresentationName = sldOne.Name
SlideNumber = ActivePresentation.SlideShowWindow.View.CurrentShowPosition
Set Web = CreateObject(“InternetExplorer.Application”)
Web.Visible = True
Web.FullScreen = True
Web.navigate ShowText
End Sub
Sub ReturnToPresentation()
‘Set objPresentation = Presentations(PresentationName)
objPresentation.Windows(1).Activate
ActivePresentation.SlideShowWindow.View.Exit
objPresentation.SlideShowSettings.Run
Application.SlideShowWindows(1).View.GotoSlide (SlideNumber)
Call HeavyLifting
End Sub
4.5 TAKING OVER KEYBOARD CONTROLS
Finally, since the presentation is initiated through a program, it may not respond
to the usual keyboard controls. This needs to be taken care of through a predefined